52. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-11-23 04:31:24 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

52.1 Files compared

#LocationFileLast Modified
1/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme 4.0.6/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/viewgallery.phtml2023-06-13 10:29:31 +0000
2/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme 4.0.7/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/viewgallery.phtml2023-11-22 08:35:59 +0000

52.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged51022
Changed12
Inserted33
Removed00

52.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

52.4 Active regular expressions

No regular expressions were active.

52.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © Magento, Inc. All rights reserved. 3  * Copyright © Magento, Inc. All rights reserved.
4  * See COPYING.txt for license details. 4  * See COPYING.txt for license details.
5  */ 5  */
6  6 
7 // @codingStandardsIgnoreFile 7 // @codingStandardsIgnoreFile
8  8 
9 /** 9 /**
10  * Product media data template 10  * Product media data template
11  * 11  *
12  * @var $block \Magento\Catalog\Block\Product\View\Gallery 12  * @var $block \Magento\Catalog\Block\Product\View\Gallery
13  */ 13  */
14 ?> 14 ?>
15 <?php 15 <?php
16 $helper = $block->getData('imageHelper'); 16 $helper = $block->getData('imageHelper');
17 $porto_helper = $this->helper('Smartwave\Porto\Helper\Data'); 17 $porto_helper = $this->helper('Smartwave\Porto\Helper\Data');
18 $_config = $porto_helper->getConfig('porto_settings/product'); 18 $_config = $porto_helper->getConfig('porto_settings/product');
19 $image_width = (isset($_config['ratio_width']) && $_config['ratio_width'])?$_config['ratio_width']:600; 19 $image_width = (isset($_config['ratio_width']) && $_config['ratio_width'])?$_config['ratio_width']:600;
20 $image_height = (isset($_config['ratio_height']) && $_config['ratio_height'])?$_config['ratio_height']:600; 20 $image_height = (isset($_config['ratio_height']) && $_config['ratio_height'])?$_config['ratio_height']:600;
21 $aspect_ratio = (isset($_config['aspect_ratio']))?$_config['aspect_ratio']:0; 21 $aspect_ratio = (isset($_config['aspect_ratio']))?$_config['aspect_ratio']:0;
    22 $disable_zoom = (isset($_config['disable_zoom']))?$_config['disable_zoom']:0;
22 if ($aspect_ratio) 23 if ($aspect_ratio)
23     $image_height = $image_width; 24     $image_height = $image_width;
24 $thumb_width = 100; 25 $thumb_width = 100;
25 $thumb_height = 100 * $image_height / $image_width; 26 $thumb_height = 100 * $image_height / $image_width;
26 if ($aspect_ratio) 27 if ($aspect_ratio)
27     $thumb_height = 100; 28     $thumb_height = 100;
28 $_product = $block->getProduct(); 29 $_product = $block->getProduct();
29 $page_type = $_product->getData('product_page_type'); 30 $page_type = $_product->getData('product_page_type');
30 if(!$page_type) 31 if(!$page_type)
31     $page_type = isset($_config['product_page_type'])?$_config['product_page_type']:''; 32     $page_type = isset($_config['product_page_type'])?$_config['product_page_type']:'';
32 $image_size = $_product->getData('product_image_size'); 33 $image_size = $_product->getData('product_image_size');
33 $thumbnail_type = (isset($_config['vertical_thumbnail']) && $_config['vertical_thumbnail'])?'vertical':'horizontal'; 34 $thumbnail_type = (isset($_config['vertical_thumbnail']) && $_config['vertical_thumbnail'])?'vertical':'horizontal';
34 if($page_type == 'wide_grid') { 35 if($page_type == 'wide_grid') {
35     $thumbnail_type = 'vertical'; 36     $thumbnail_type = 'vertical';
36     $thumb_width = 100; 37     $thumb_width = 100;
37     $thumb_height = 100; 38     $thumb_height = 100;
38 }  39 }
39 ?> 40 ?>
40 <?php if($page_type == 'carousel'): ?> 41 <?php if($page_type == 'carousel'): ?>
41 <?php 42 <?php
42     $gallery_images = json_decode($block->getGalleryImagesJson()); 43     $gallery_images = json_decode($block->getGalleryImagesJson());
43 ?> 44 ?>
44 <div id="gallery_images" class="owl-carousel product-image-carousel show-nav-hover"> 45 <div id="gallery_images" class="owl-carousel product-image-carousel show-nav-hover">
45     <?php foreach($gallery_images as $gallery_image): ?> 46     <?php foreach($gallery_images as $gallery_image): ?>
46     <div class="item"> 47     <div class="item">
47         <img src="<?php echo $gallery_image->img; ?>" alt=""/> 48         <img src="<?php echo $gallery_image->img; ?>" alt=""/>
48     </div> 49     </div>
49     <?php endforeach; ?> 50     <?php endforeach; ?>
50 </div> 51 </div>
51 <div class="short-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block")?$_product->getData("custom_block"):''); ?></div> 52 <div class="short-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block")?$_product->getData("custom_block"):''); ?></div>
52 <div class="fullwidth-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block_2")?$_product->getData("custom_block_2"):''); ?></div> 53 <div class="fullwidth-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block_2")?$_product->getData("custom_block_2"):''); ?></div>
53 <script type="text/javascript"> 54 <script type="text/javascript">
54   require([ 55   require([
55     'jquery', 56     'jquery',
56     'owl.carousel/owl.carousel.min' 57     'owl.carousel/owl.carousel.min'
57   ], function ($) { 58   ], function ($) {
58     $("#gallery_images").owlCarousel({ 59     $("#gallery_images").owlCarousel({
59       autoplay: false, 60       autoplay: false,
60       autoplayTimeout: 5000, 61       autoplayTimeout: 5000,
61       autoplayHoverPause: true, 62       autoplayHoverPause: true,
62       loop: true, 63       loop: true,
63       navRewind: true, 64       navRewind: true,
64       margin: 0, 65       margin: 0,
65       nav: true, 66       nav: true,
66       dots: false, 67       dots: false,
67       responsive: { 68       responsive: {
68         0: { 69         0: {
69           items:1 70           items:1
70         }, 71         },
71         768: { 72         768: {
72           items:1 73           items:1
73         }, 74         },
74         992: { 75         992: {
75           items:2 76           items:2
76         }, 77         },
77         1200: { 78         1200: {
78           items:3 79           items:3
79         } 80         }
80       } 81       }
81     }); 82     });
82     $(document).ready(function(){ 83     $(document).ready(function(){
83         $(".product-info-main > .product-info-price").after($(".short-custom-block").show().detach()); 84         $(".product-info-main > .product-info-price").after($(".short-custom-block").show().detach());
84         $(".page-main").after($(".fullwidth-custom-block").show().detach()); 85         $(".page-main").after($(".fullwidth-custom-block").show().detach());
85         $(".product-info-main > .page-title-wrapper").after($(".product-social-links").detach()); 86         $(".product-info-main > .page-title-wrapper").after($(".product-social-links").detach());
86     }); 87     });
87   }); 88   });
88 </script> 89 </script>
89 <?php elseif($page_type == 'grid'): ?> 90 <?php elseif($page_type == 'grid'): ?>
90 <?php 91 <?php
91     $gallery_images = json_decode($block->getGalleryImagesJson()); 92     $gallery_images = json_decode($block->getGalleryImagesJson());
92 ?> 93 ?>
93 <div id="gallery_images" class="row"> 94 <div id="gallery_images" class="row">
94     <?php foreach($gallery_images as $gallery_image): ?> 95     <?php foreach($gallery_images as $gallery_image): ?>
95     <div class="col-sm-6"> 96     <div class="col-sm-6">
96         <div class="product-image-grid"> 97         <div class="product-image-grid">
97             <img src="<?php echo $gallery_image->img; ?>" alt=""/> 98             <img src="<?php echo $gallery_image->img; ?>" alt=""/>
98         </div> 99         </div>
99     </div> 100     </div>
100     <?php endforeach; ?> 101     <?php endforeach; ?>
101 </div> 102 </div>
102 <?php elseif($page_type == 'sticky_right'): ?> 103 <?php elseif($page_type == 'sticky_right'): ?>
103 <?php 104 <?php
104     $gallery_images = json_decode($block->getGalleryImagesJson()); 105     $gallery_images = json_decode($block->getGalleryImagesJson());
105 ?> 106 ?>
106 <div id="gallery_images"> 107 <div id="gallery_images">
107     <?php foreach($gallery_images as $gallery_image): ?> 108     <?php foreach($gallery_images as $gallery_image): ?>
108     <div class="product-image-list"> 109     <div class="product-image-list">
109         <img src="<?php echo $gallery_image->img; ?>" alt=""/> 110         <img src="<?php echo $gallery_image->img; ?>" alt=""/>
110     </div> 111     </div>
111     <?php endforeach; ?> 112     <?php endforeach; ?>
112 </div> 113 </div>
113 <div class="short-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block")?$_product->getData("custom_block"):''); ?></div> 114 <div class="short-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block")?$_product->getData("custom_block"):''); ?></div>
114 <script type="text/javascript"> 115 <script type="text/javascript">
115 require([ 116 require([
116     'jquery' 117     'jquery'
117 ], function ($) { 118 ], function ($) {
118     var product_info_top = 0; 119     var product_info_top = 0;
119     var product_image_box_pos = $(".product.media").offset().top; 120     var product_image_box_pos = $(".product.media").offset().top;
120     $(".product.detailed").before($(".short-custom-block").show().detach()).before($(".product-social-links").detach()); 121     $(".product.detailed").before($(".short-custom-block").show().detach()).before($(".product-social-links").detach());
121     $(window).scroll(function(){ 122     $(window).scroll(function(){
122         product_image_box_pos = $(".product.media").offset().top; 123         product_image_box_pos = $(".product.media").offset().top;
123         if($(window).innerWidth() >= 768) { 124         if($(window).innerWidth() >= 768) {
124             $(".product-info-main").each(function(){ 125             $(".product-info-main").each(function(){
125                 if(($(window).scrollTop() > product_image_box_pos - 50) && (product_image_box_pos + $(".product.media").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) { 126                 if(($(window).scrollTop() > product_image_box_pos - 50) && (product_image_box_pos + $(".product.media").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) {
126                     product_info_top = $(window).scrollTop() - product_image_box_pos + 50; 127                     product_info_top = $(window).scrollTop() - product_image_box_pos + 50;
127                     $(this).css('top',product_info_top + 'px'); 128                     $(this).css('top',product_info_top + 'px');
128                 } else if ($(window).scrollTop() < product_image_box_pos || $(".product.media").outerHeight() < $(this).outerHeight()) { 129                 } else if ($(window).scrollTop() < product_image_box_pos || $(".product.media").outerHeight() < $(this).outerHeight()) {
129                     product_info_top = 0; 130                     product_info_top = 0;
130                     $(this).css('top',product_info_top + 'px'); 131                     $(this).css('top',product_info_top + 'px');
131                 } else { 132                 } else {
132                     product_info_top = $(".product.media").outerHeight() - $(this).outerHeight(); 133                     product_info_top = $(".product.media").outerHeight() - $(this).outerHeight();
133                     $(this).css('top',product_info_top + 'px'); 134                     $(this).css('top',product_info_top + 'px');
134                 } 135                 }
135             }); 136             });
136         } else { 137         } else {
137             product_info_top = 0; 138             product_info_top = 0;
138             $(".product-info-main").css('top',product_info_top + 'px'); 139             $(".product-info-main").css('top',product_info_top + 'px');
139         } 140         }
140     }); 141     });
141     $(window).resize(function(){ 142     $(window).resize(function(){
142         product_image_box_pos = $(".product.media").offset().top; 143         product_image_box_pos = $(".product.media").offset().top;
143         if($(window).innerWidth() >= 992) { 144         if($(window).innerWidth() >= 992) {
144             $(".product-info-main").each(function(){ 145             $(".product-info-main").each(function(){
145                 if(($(window).scrollTop() > product_image_box_pos - 50) && (product_image_box_pos + $(".product.media").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) { 146                 if(($(window).scrollTop() > product_image_box_pos - 50) && (product_image_box_pos + $(".product.media").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) {
146                     product_info_top = $(window).scrollTop() - product_image_box_pos + 50; 147                     product_info_top = $(window).scrollTop() - product_image_box_pos + 50;
147                     $(this).css('top',product_info_top + 'px'); 148                     $(this).css('top',product_info_top + 'px');
148                 } else if ($(window).scrollTop() < product_image_box_pos || $(".product.media").outerHeight() < $(this).outerHeight()) { 149                 } else if ($(window).scrollTop() < product_image_box_pos || $(".product.media").outerHeight() < $(this).outerHeight()) {
149                     product_info_top = 0; 150                     product_info_top = 0;
150                     $(this).css('top',product_info_top + 'px'); 151                     $(this).css('top',product_info_top + 'px');
151                 } else { 152                 } else {
152                     product_info_top = $(".product.media").outerHeight() - $(this).outerHeight(); 153                     product_info_top = $(".product.media").outerHeight() - $(this).outerHeight();
153                     $(this).css('top',product_info_top + 'px'); 154                     $(this).css('top',product_info_top + 'px');
154                 } 155                 }
155             }); 156             });
156         } else { 157         } else {
157             product_info_top = 0; 158             product_info_top = 0;
158             $(".product-info-main").css('top',product_info_top + 'px'); 159             $(".product-info-main").css('top',product_info_top + 'px');
159         } 160         }
160     }); 161     });
161 }); 162 });
162 </script> 163 </script>
163 <?php elseif($page_type == 'fullwidth'): ?> 164 <?php elseif($page_type == 'fullwidth'): ?>
164 <div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder"> 165 <div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder">
165     <div data-role="loader" class="loading-mask"> 166     <div data-role="loader" class="loading-mask">
166         <div class="loader"> 167         <div class="loader">
167             <img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>" 168             <img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
168                  alt="<?php /* @escapeNotVerified */ echo __('Loading...') ?>"> 169                  alt="<?php /* @escapeNotVerified */ echo __('Loading...') ?>">
169         </div> 170         </div>
170     </div> 171     </div>
171 </div> 172 </div>
172 <!--Fix for jumping content. Loader must be the same size as gallery.--> 173 <!--Fix for jumping content. Loader must be the same size as gallery.-->
173 <script> 174 <script>
174     var config = { 175     var config = {
175             "width": <?php /* @escapeNotVerified */ echo $image_width; ?>, 176             "width": <?php /* @escapeNotVerified */ echo $image_width; ?>,
176             "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height') 177             "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
177                         ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>, 178                         ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,
178             "navtype": "<?php /* @escapeNotVerified */ echo $block->getVar("gallery/navtype"); ?>", 179             "navtype": "<?php /* @escapeNotVerified */ echo $block->getVar("gallery/navtype"); ?>",
179             <?php if (!$aspect_ratio): ?> 180             <?php if (!$aspect_ratio): ?>
180                 "height": <?php /* @escapeNotVerified */ echo $image_height; ?> 181                 "height": <?php /* @escapeNotVerified */ echo $image_height; ?>
181             <?php endif; ?> 182             <?php endif; ?>
182         }, 183         },
183         thumbBarHeight = 0, 184         thumbBarHeight = 0,
184         loader = document.querySelectorAll('[data-gallery-role="gallery-placeholder"] [data-role="loader"]')[0]; 185         loader = document.querySelectorAll('[data-gallery-role="gallery-placeholder"] [data-role="loader"]')[0];
185  186 
186     if (config.navtype === 'horizontal') { 187     if (config.navtype === 'horizontal') {
187         thumbBarHeight = config.thumbheight; 188         thumbBarHeight = config.thumbheight;
188     } 189     }
189  190 
190     loader.style.paddingBottom = ( config.height / config.width * 100) + "%"; 191     loader.style.paddingBottom = ( config.height / config.width * 100) + "%";
191 </script> 192 </script>
192 <script type="text/x-magento-init"> 193 <script type="text/x-magento-init">
193     { 194     {
194         "[data-gallery-role=gallery-placeholder]": { 195         "[data-gallery-role=gallery-placeholder]": {
195             "mage/gallery/gallery": { 196             "mage/gallery/gallery": {
196                 "mixins":["magnifier/magnify"], 197                 "mixins":["magnifier/magnify"],
197                 "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>, 198                 "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>,
198                 "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>, 199                 "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>,
199                 "options": { 200                 "options": {
200                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>", 201                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>",
201                     <?php if (($block->getVar("gallery/loop"))): ?> 202                     <?php if (($block->getVar("gallery/loop"))): ?>
202                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>, 203                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>,
203                     <?php endif; ?> 204                     <?php endif; ?>
204                     <?php if (($block->getVar("gallery/keyboard"))): ?> 205                     <?php if (($block->getVar("gallery/keyboard"))): ?>
205                         "keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>, 206                         "keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>,
206                     <?php endif; ?> 207                     <?php endif; ?>
207                     <?php if (($block->getVar("gallery/arrows"))): ?> 208                     <?php if (($block->getVar("gallery/arrows"))): ?>
208                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/arrows") ?>, 209                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/arrows") ?>,
209                     <?php endif; ?> 210                     <?php endif; ?>
210                     <?php if (($block->getVar("gallery/allowfullscreen"))): ?> 211                     <?php if (($block->getVar("gallery/allowfullscreen"))): ?>
211                         "allowfullscreen": <?= /* @escapeNotVerified */ $block->getVar("gallery/allowfullscreen") ?>, 212                         "allowfullscreen": <?= /* @escapeNotVerified */ $block->getVar("gallery/allowfullscreen") ?>,
212                     <?php endif; ?> 213                     <?php endif; ?>
213                     <?php if (($block->getVar("gallery/caption"))): ?> 214                     <?php if (($block->getVar("gallery/caption"))): ?>
214                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/caption") ?>, 215                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/caption") ?>,
215                     <?php endif; ?> 216                     <?php endif; ?>
216                     "width": <?php /* @escapeNotVerified */ echo $image_width; ?>, 217                     "width": <?php /* @escapeNotVerified */ echo $image_width; ?>,
217                     "thumbwidth": <?php /* @escapeNotVerified */ echo $thumb_width; ?>, 218                     "thumbwidth": <?php /* @escapeNotVerified */ echo $thumb_width; ?>,
218                     "thumbheight": <?php /* @escapeNotVerified */ echo $thumb_height; ?>, 219                     "thumbheight": <?php /* @escapeNotVerified */ echo $thumb_height; ?>,
219                     <?php if(!$aspect_ratio): ?> 220                     <?php if(!$aspect_ratio): ?>
220                     "height": <?php /* @escapeNotVerified */ echo $image_height; ?>, 221                     "height": <?php /* @escapeNotVerified */ echo $image_height; ?>,
221                     <?php endif; ?> 222                     <?php endif; ?>
222                     "thumbmargin": <?php echo $block->getVar("gallery/thumbmargin") ?>, 223                     "thumbmargin": <?php echo $block->getVar("gallery/thumbmargin") ?>,
223                     <?php if ($block->getVar("gallery/transition/duration")): ?> 224                     <?php if ($block->getVar("gallery/transition/duration")): ?>
224                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>, 225                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>,
225                     <?php endif; ?> 226                     <?php endif; ?>
226                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>", 227                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>",
227                     <?php if (($block->getVar("gallery/navarrows"))): ?> 228                     <?php if (($block->getVar("gallery/navarrows"))): ?>
228                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>, 229                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>,
229                     <?php endif; ?> 230                     <?php endif; ?>
230                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>", 231                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>",
231                     "navdir": "vertical" 232                     "navdir": "vertical"
232                 }, 233                 },
233                 "fullscreen": { 234                 "fullscreen": {
234                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav") ?>", 235                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav") ?>",
235                     <?php if ($block->getVar("gallery/fullscreen/loop")): ?> 236                     <?php if ($block->getVar("gallery/fullscreen/loop")): ?>
236                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ?>, 237                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ?>,
237                     <?php endif; ?> 238                     <?php endif; ?>
238                     "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir") ?>", 239                     "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir") ?>",
239                     <?php if ($block->getVar("gallery/transition/navarrows")): ?> 240                     <?php if ($block->getVar("gallery/transition/navarrows")): ?>
240                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ?>, 241                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ?>,
241                     <?php endif; ?> 242                     <?php endif; ?>
242                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype") ?>", 243                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype") ?>",
243                     <?php if ($block->getVar("gallery/fullscreen/arrows")): ?> 244                     <?php if ($block->getVar("gallery/fullscreen/arrows")): ?>
244                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ?>, 245                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ?>,
245                     <?php endif; ?> 246                     <?php endif; ?>
246                     <?php if ($block->getVar("gallery/fullscreen/caption")): ?> 247                     <?php if ($block->getVar("gallery/fullscreen/caption")): ?>
247                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ?>, 248                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ?>,
248                     <?php endif; ?> 249                     <?php endif; ?>
249                     <?php if ($block->getVar("gallery/fullscreen/transition/duration")): ?> 250                     <?php if ($block->getVar("gallery/fullscreen/transition/duration")): ?>
250                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/duration") ?>, 251                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/duration") ?>,
251                     <?php endif; ?> 252                     <?php endif; ?>
252                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/effect") ?>" 253                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/effect") ?>"
253                 }, 254                 },
254                 "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?> 255                 "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?>
255             } 256             }
256         } 257         }
257     } 258     }
258 </script> 259 </script>
259 <div class="short-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block")?$_product->getData("custom_block"):''); ?></div> 260 <div class="short-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block")?$_product->getData("custom_block"):''); ?></div>
260 <div class="fullwidth-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block_2")?$_product->getData("custom_block_2"):''); ?></div> 261 <div class="fullwidth-custom-block" style="display: none;"><?php echo $porto_helper->filterContent($_product->getData("custom_block_2")?$_product->getData("custom_block_2"):''); ?></div>
261 <script type="text/javascript"> 262 <script type="text/javascript">
262     require([ 263     require([
263         'jquery' 264         'jquery'
264     ], function($){ 265     ], function($){
265         $(document).on('fotorama:load', function(e, fotorama, extra){ 266         $(document).on('fotorama:load', function(e, fotorama, extra){
266             if($('.loading-mask').length>0) 267             if($('.loading-mask').length>0)
267                 $('.loading-mask').remove(); 268                 $('.loading-mask').remove();
268         }); 269         });
269         $(document).ready(function(){ 270         $(document).ready(function(){
270             $(".product.info.detailed").detach().appendTo($(".product-info-main")); 271             $(".product.info.detailed").detach().appendTo($(".product-info-main"));
271             $(".page-main").after($(".fullwidth-custom-block").show().detach()); 272             $(".page-main").after($(".fullwidth-custom-block").show().detach());
272             $(".page-title-wrapper.product").before($(".short-custom-block").show().detach()); 273             $(".page-title-wrapper.product").before($(".short-custom-block").show().detach());
273         }); 274         });
274         var product_image_box_top = 0; 275         var product_image_box_top = 0;
275         var product_info_pos = $(".product-info-main").offset().top; 276         var product_info_pos = $(".product-info-main").offset().top;
276         $(window).scroll(function(){ 277         $(window).scroll(function(){
277             product_info_pos = $(".product-info-main").offset().top; 278             product_info_pos = $(".product-info-main").offset().top;
278             if($(window).innerWidth() >= 768) { 279             if($(window).innerWidth() >= 768) {
279                 $(".product.media").each(function(){ 280                 $(".product.media").each(function(){
280                     if(($(window).scrollTop() > product_info_pos - 50) && (product_info_pos + $(".product-info-main").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) { 281                     if(($(window).scrollTop() > product_info_pos - 50) && (product_info_pos + $(".product-info-main").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) {
281                         product_image_box_top = $(window).scrollTop() - product_info_pos + 50; 282                         product_image_box_top = $(window).scrollTop() - product_info_pos + 50;
282                         $(this).css('top',product_image_box_top + 'px'); 283                         $(this).css('top',product_image_box_top + 'px');
283                     } else if ($(window).scrollTop() < product_info_pos) { 284                     } else if ($(window).scrollTop() < product_info_pos) {
284                         product_image_box_top = 0; 285                         product_image_box_top = 0;
285                         $(this).css('top',product_image_box_top + 'px'); 286                         $(this).css('top',product_image_box_top + 'px');
286                     } 287                     }
287                 }); 288                 });
288             } else { 289             } else {
289                 product_image_box_top = 0; 290                 product_image_box_top = 0;
290                 $(".product.media").css('top',product_image_box_top + 'px'); 291                 $(".product.media").css('top',product_image_box_top + 'px');
291             } 292             }
292         }); 293         });
293         $(window).resize(function(){ 294         $(window).resize(function(){
294             product_info_pos = $(".product-info-main").offset().top; 295             product_info_pos = $(".product-info-main").offset().top;
295             if($(window).innerWidth() >= 768) { 296             if($(window).innerWidth() >= 768) {
296                 $(".product.media").each(function(){ 297                 $(".product.media").each(function(){
297                     if(($(window).scrollTop() > product_info_pos - 50) && (product_info_pos + $(".product-info-main").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) { 298                     if(($(window).scrollTop() > product_info_pos - 50) && (product_info_pos + $(".product-info-main").outerHeight()) > ($(window).scrollTop() + $(this).outerHeight() + 50)) {
298                         product_image_box_top = $(window).scrollTop() - product_info_pos + 50; 299                         product_image_box_top = $(window).scrollTop() - product_info_pos + 50;
299                         $(this).css('top',product_image_box_top + 'px'); 300                         $(this).css('top',product_image_box_top + 'px');
300                     } else if ($(window).scrollTop() < product_info_pos) { 301                     } else if ($(window).scrollTop() < product_info_pos) {
301                         product_image_box_top = 0; 302                         product_image_box_top = 0;
302                         $(this).css('top',product_image_box_top + 'px'); 303                         $(this).css('top',product_image_box_top + 'px');
303                     } 304                     }
304                 }); 305                 });
305             } else { 306             } else {
306                 product_image_box_top = 0; 307                 product_image_box_top = 0;
307                 $(".product.media").css('top',product_image_box_top + 'px'); 308                 $(".product.media").css('top',product_image_box_top + 'px');
308             } 309             }
309         }); 310         });
310     }); 311     });
311 </script> 312 </script>
312 <style> 313 <style>
313 .fotorama__nav-wrap--vertical .fotorama__nav__shaft {margin-top: -<?php echo $block->getVar("gallery/thumbmargin") ?>px;} 314 .fotorama__nav-wrap--vertical .fotorama__nav__shaft {margin-top: -<?php echo $block->getVar("gallery/thumbmargin") ?>px;}
314 @media (min-width:768px) { 315 @media (min-width:768px) {
315   .fotorama__stage { 316   .fotorama__stage {
316     max-width: calc(100% - <?php echo ($block->getVar("gallery/thumbmargin") + $thumb_width); ?>px); 317     max-width: calc(100% - <?php echo ($block->getVar("gallery/thumbmargin") + $thumb_width); ?>px);
317   } 318   }
318 } 319 }
319 </style> 320 </style>
320 <?php else: ?> 321 <?php else: ?>
321 <?php 322 <?php
322 $images = $block->getGalleryImages()->getItems(); 323 $images = $block->getGalleryImages()->getItems();
323 $mainImage = current(array_filter($images, function ($img) use ($block) { 324 $mainImage = current(array_filter($images, function ($img) use ($block) {
324     return $block->isMainImage($img); 325     return $block->isMainImage($img);
325 })); 326 }));
326 if (!empty($images) && empty($mainImage)) { 327 if (!empty($images) && empty($mainImage)) {
327     $mainImage = $block->getGalleryImages()->getFirstItem(); 328     $mainImage = $block->getGalleryImages()->getFirstItem();
328 } 329 }
329 $mainImageData = $mainImage ? 330 $mainImageData = $mainImage ?
330     $mainImage->getData('medium_image_url') : 331     $mainImage->getData('medium_image_url') :
331     $helper->getDefaultPlaceholderUrl('image'); 332     $helper->getDefaultPlaceholderUrl('image');
332  333 
333 ?> 334 ?>
334 <div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder"> 335 <div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder">
335     <img 336     <img
336         alt="main product photo" 337         alt="main product photo"
337         class="gallery-placeholder__image" 338         class="gallery-placeholder__image"
338         src="<?= /* @noEscape */ $mainImageData ?>" 339         src="<?= /* @noEscape */ $mainImageData ?>"
339     /> 340     />
340     <div data-role="loader" class="loading-mask"> 341     <div data-role="loader" class="loading-mask">
341         <div class="loader"> 342         <div class="loader">
342             <img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>" 343             <img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
343                  alt="<?php /* @escapeNotVerified */ echo __('Loading...') ?>"> 344                  alt="<?php /* @escapeNotVerified */ echo __('Loading...') ?>">
344         </div> 345         </div>
345     </div> 346     </div>
346 </div> 347 </div>
347 <style> 348 <style>
348 <?php if($thumbnail_type != 'vertical'):?> 349 <?php if($thumbnail_type != 'vertical'):?>
349 .fotorama__wrap { 350 .fotorama__wrap {
350     margin-bottom: -<?php echo $block->getVar("gallery/thumbmargin") ?>px; 351     margin-bottom: -<?php echo $block->getVar("gallery/thumbmargin") ?>px;
351 } 352 }
352 <?php endif;?> 353 <?php endif;?>
353 <?php if($thumbnail_type == 'vertical'):?> 354 <?php if($thumbnail_type == 'vertical'):?>
354 .fotorama__nav-wrap--vertical .fotorama__nav__shaft {margin-top: -<?php echo $block->getVar("gallery/thumbmargin") ?>px;} 355 .fotorama__nav-wrap--vertical .fotorama__nav__shaft {margin-top: -<?php echo $block->getVar("gallery/thumbmargin") ?>px;}
355 @media (min-width:992px) { 356 @media (min-width:992px) {
356   .fotorama__stage { 357   .fotorama__stage {
357     max-width: calc(100% - <?php echo ($block->getVar("gallery/thumbmargin") + $thumb_width); ?>px); 358     max-width: calc(100% - <?php echo ($block->getVar("gallery/thumbmargin") + $thumb_width); ?>px);
358   } 359   }
359 } 360 }
360 <?php endif;?> 361 <?php endif;?>
361 </style> 362 </style>
362 <!--Fix for jumping content. Loader must be the same size as gallery.--> 363 <!--Fix for jumping content. Loader must be the same size as gallery.-->
363 <script> 364 <script>
364     var config = { 365     var config = {
365             "width": <?php /* @escapeNotVerified */ echo $image_width; ?>, 366             "width": <?php /* @escapeNotVerified */ echo $image_width; ?>,
366             "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height') 367             "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
367                         ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>, 368                         ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,
368             "navtype": "<?php /* @escapeNotVerified */ echo $block->getVar("gallery/navtype"); ?>", 369             "navtype": "<?php /* @escapeNotVerified */ echo $block->getVar("gallery/navtype"); ?>",
369             <?php if (!$aspect_ratio): ?> 370             <?php if (!$aspect_ratio): ?>
370                 "height": <?php /* @escapeNotVerified */ echo $image_height; ?> 371                 "height": <?php /* @escapeNotVerified */ echo $image_height; ?>
371             <?php endif; ?> 372             <?php endif; ?>
372         }, 373         },
373         thumbBarHeight = 0, 374         thumbBarHeight = 0,
374         loader = document.querySelectorAll('[data-gallery-role="gallery-placeholder"] [data-role="loader"]')[0]; 375         loader = document.querySelectorAll('[data-gallery-role="gallery-placeholder"] [data-role="loader"]')[0];
375  376 
376     if (config.navtype === 'horizontal') { 377     if (config.navtype === 'horizontal') {
377         thumbBarHeight = config.thumbheight; 378         thumbBarHeight = config.thumbheight;
378     } 379     }
379  380 
380     loader.style.paddingBottom = ( config.height / config.width * 100) + "%"; 381     loader.style.paddingBottom = ( config.height / config.width * 100) + "%";
381 </script> 382 </script>
382 <script type="text/x-magento-init"> 383 <script type="text/x-magento-init">
383     { 384     {
384         "[data-gallery-role=gallery-placeholder]": { 385         "[data-gallery-role=gallery-placeholder]": {
385             "mage/gallery/gallery": { 386             "mage/gallery/gallery": {
386                 "mixins":["magnifier/magnify"], 387                 "mixins":["magnifier/magnify"],
387                 "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>, 388                 "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>,
388                 "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>, 389                 "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>,
389                 "options": { 390                 "options": {
390                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>", 391                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>",
391                     <?php if (($block->getVar("gallery/loop"))): ?> 392                     <?php if (($block->getVar("gallery/loop"))): ?>
392                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>, 393                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>,
393                     <?php endif; ?> 394                     <?php endif; ?>
394                     <?php if (($block->getVar("gallery/keyboard"))): ?> 395                     <?php if (($block->getVar("gallery/keyboard"))): ?>
395                         "keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>, 396                         "keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>,
396                     <?php endif; ?> 397                     <?php endif; ?>
397                     <?php if (($block->getVar("gallery/arrows"))): ?> 398                     <?php if (($block->getVar("gallery/arrows"))): ?>
398                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/arrows") ?>, 399                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/arrows") ?>,
399                     <?php endif; ?> 400                     <?php endif; ?>
400                     <?php if (($block->getVar("gallery/allowfullscreen"))): ?> 401                     <?php if (($block->getVar("gallery/allowfullscreen"))): ?>
401                         "allowfullscreen": <?= /* @escapeNotVerified */ $block->getVar("gallery/allowfullscreen") ?>, 402                         "allowfullscreen": <?= /* @escapeNotVerified */ $block->getVar("gallery/allowfullscreen") ?>,
402                     <?php endif; ?> 403                     <?php endif; ?>
403                     <?php if (($block->getVar("gallery/caption"))): ?> 404                     <?php if (($block->getVar("gallery/caption"))): ?>
404                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/caption") ?>, 405                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/caption") ?>,
405                     <?php endif; ?> 406                     <?php endif; ?>
406                     "width": <?php /* @escapeNotVerified */ echo $image_width; ?>, 407                     "width": <?php /* @escapeNotVerified */ echo $image_width; ?>,
407                     "thumbwidth": <?php /* @escapeNotVerified */ echo $thumb_width; ?>, 408                     "thumbwidth": <?php /* @escapeNotVerified */ echo $thumb_width; ?>,
408                     "thumbheight": <?php /* @escapeNotVerified */ echo $thumb_height; ?>, 409                     "thumbheight": <?php /* @escapeNotVerified */ echo $thumb_height; ?>,
409                     <?php if(!$aspect_ratio): ?> 410                     <?php if(!$aspect_ratio): ?>
410                     "height": <?php /* @escapeNotVerified */ echo $image_height; ?>, 411                     "height": <?php /* @escapeNotVerified */ echo $image_height; ?>,
411                     <?php endif; ?> 412                     <?php endif; ?>
412                     "thumbmargin": <?php echo $block->getVar("gallery/thumbmargin") ?>, 413                     "thumbmargin": <?php echo $block->getVar("gallery/thumbmargin") ?>,
413                     <?php if ($block->getVar("gallery/transition/duration")): ?> 414                     <?php if ($block->getVar("gallery/transition/duration")): ?>
414                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>, 415                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>,
415                     <?php endif; ?> 416                     <?php endif; ?>
416                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>", 417                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>",
417                     <?php if (($block->getVar("gallery/navarrows"))): ?> 418                     <?php if (($block->getVar("gallery/navarrows"))): ?>
418                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>, 419                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>,
419                     <?php endif; ?> 420                     <?php endif; ?>
420                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>", 421                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>",
421                     "navdir": "<?= /* @escapeNotVerified */ $thumbnail_type ?>" 422                     "navdir": "<?= /* @escapeNotVerified */ $thumbnail_type ?>"
422                 }, 423                 },
423                 "fullscreen": { 424                 "fullscreen": {
424                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav") ?>", 425                     "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav") ?>",
425                     <?php if ($block->getVar("gallery/fullscreen/loop")): ?> 426                     <?php if ($block->getVar("gallery/fullscreen/loop")): ?>
426                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ?>, 427                         "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ?>,
427                     <?php endif; ?> 428                     <?php endif; ?>
428                     "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir") ?>", 429                     "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir") ?>",
429                     <?php if ($block->getVar("gallery/transition/navarrows")): ?> 430                     <?php if ($block->getVar("gallery/transition/navarrows")): ?>
430                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ?>, 431                         "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ?>,
431                     <?php endif; ?> 432                     <?php endif; ?>
432                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype") ?>", 433                     "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype") ?>",
433                     <?php if ($block->getVar("gallery/fullscreen/arrows")): ?> 434                     <?php if ($block->getVar("gallery/fullscreen/arrows")): ?>
434                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ?>, 435                         "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ?>,
435                     <?php endif; ?> 436                     <?php endif; ?>
436                     <?php if ($block->getVar("gallery/fullscreen/caption")): ?> 437                     <?php if ($block->getVar("gallery/fullscreen/caption")): ?>
437                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ?>, 438                         "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ?>,
438                     <?php endif; ?> 439                     <?php endif; ?>
439                     <?php if ($block->getVar("gallery/fullscreen/transition/duration")): ?> 440                     <?php if ($block->getVar("gallery/fullscreen/transition/duration")): ?>
440                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/duration") ?>, 441                         "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/duration") ?>,
441                     <?php endif; ?> 442                     <?php endif; ?>
442                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/effect") ?>" 443                     "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/effect") ?>"
443                 }, 444                 },
444                 "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?> 445                 "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?>
445             } 446             }
446         } 447         }
447     } 448     }
448 </script> 449 </script>
449 <script type="text/javascript"> 450 <script type="text/javascript">
450 require([ 451 require([
451     'jquery', 452     'jquery',
452     'Magento_Catalog/js/jquery.zoom.min' 453     'Magento_Catalog/js/jquery.zoom.min'
453 ], function ($) { 454 ], function ($) {
454     var loaded = false; 455     var loaded = false;
455     $(document).on('fotorama:load', function(e, fotorama, extra){ 456     $(document).on('fotorama:load', function(e, fotorama, extra){
456         if($('.loading-mask').length>0) 457         if($('.loading-mask').length>0)
457             $('.loading-mask').remove(); 458             $('.loading-mask').remove();
458     }); 459     });
    460     <?php if(!$disable_zoom):?>
459     $('.product.media .gallery-placeholder').bind("DOMSubtreeModified",function(){ 461     $('.product.media .gallery-placeholder').bind("DOMSubtreeModified",function(){
460         $('.product.media .fotorama').on('fotorama:ready', function (e, fotorama, extra) { 462         $('.product.media .fotorama').on('fotorama:ready', function (e, fotorama, extra) {
461             loaded = false; 463             loaded = false;
462             $('.product.media .fotorama').on('fotorama:load', function (e, fotorama, extra) { 464             $('.product.media .fotorama').on('fotorama:load', function (e, fotorama, extra) {
463                 if(!loaded){ 465                 if(!loaded){
464                     $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy'); 466                     $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy');
465                     $('.product.media .fotorama__stage .fotorama__active').zoom({ 467                     $('.product.media .fotorama__stage .fotorama__active').zoom({
466                         touch:false 468                         touch:false
467                     }); 469                     });
468                     loaded = true; 470                     loaded = true;
469                 } 471                 }
470             }); 472             });
471             $('.product.media .fotorama').on('fotorama:showend', function (e, fotorama, extra) { 473             $('.product.media .fotorama').on('fotorama:showend', function (e, fotorama, extra) {
472                 $('.product.media .fotorama__stage .fotorama__active').zoom({ 474                 $('.product.media .fotorama__stage .fotorama__active').zoom({
473                     touch:false 475                     touch:false
474                 }); 476                 });
475             }); 477             });
476             $('.fotorama').off('fotorama:fullscreenenter').on('fotorama:fullscreenenter', function (e, fotorama, extra) { 478             $('.fotorama').off('fotorama:fullscreenenter').on('fotorama:fullscreenenter', function (e, fotorama, extra) {
477                 $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy'); 479                 $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy');
478                 $('img.zoomImg').remove(); 480                 $('img.zoomImg').remove();
479             }); 481             });
480             $('.fotorama').off('fotorama:fullscreenexit').on('fotorama:fullscreenexit', function (e, fotorama, extra) { 482             $('.fotorama').off('fotorama:fullscreenexit').on('fotorama:fullscreenexit', function (e, fotorama, extra) {
481                 $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy'); 483                 $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy');
482                 $('img.zoomImg').remove(); 484                 $('img.zoomImg').remove();
483                 $('img.fotorama__img').not('.fotorama__img--full').each(function(){ 485                 $('img.fotorama__img').not('.fotorama__img--full').each(function(){
484                     $(this).after($(this).parent().children("img.fotorama__img--full")); 486                     $(this).after($(this).parent().children("img.fotorama__img--full"));
485                 }); 487                 });
486                 $('.product.media .fotorama__stage .fotorama__active').zoom({ 488                 $('.product.media .fotorama__stage .fotorama__active').zoom({
487                     touch:false 489                     touch:false
488                 }); 490                 });
489                 $('.product.media .fotorama').off('fotorama:showend').on('fotorama:showend', function (e, fotorama, extra) { 491                 $('.product.media .fotorama').off('fotorama:showend').on('fotorama:showend', function (e, fotorama, extra) {
490                     $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy'); 492                     $('.product.media .fotorama__stage .fotorama__loaded--img').trigger('zoom.destroy');
491                     $('.product.media .fotorama__stage .fotorama__active').zoom({ 493                     $('.product.media .fotorama__stage .fotorama__active').zoom({
492                         touch:false 494                         touch:false
493                     }); 495                     });
494                 }); 496                 });
495             }); 497             });
496         }); 498         });
497     }); 499     });
    500     <?php endif;?>
498 }); 501 });
499 </script> 502 </script>
500 <?php endif; ?> 503 <?php endif; ?>
501 <?php if ($image_size): ?> 504 <?php if ($image_size): ?>
502 <style type="text/css"> 505 <style type="text/css">
503     @media (min-width: 768px) { 506     @media (min-width: 768px) {
504         .product.media { 507         .product.media {
505             width: <?php echo $image_size * 100 / 12 - 2; ?>% !important; 508             width: <?php echo $image_size * 100 / 12 - 2; ?>% !important;
506         } 509         }
507         .product-info-main { 510         .product-info-main {
508             width: <?php echo (12 - $image_size) * 100 / 12; ?>% !important; 511             width: <?php echo (12 - $image_size) * 100 / 12; ?>% !important;
509         } 512         }
510     } 513     }
511 </style> 514 </style>
512 <?php endif; ?> 515 <?php endif; ?>